﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI;
using System.ComponentModel;

namespace JQuery
{
    public class DraggableExtender : JQueryExtender
    {
        [JQueryElement("addClasses")]
        public bool? AddClasses
        {
            get { return GetPropertyValue<bool>("AddClasses", (bool?)false); }
            set { SetPropertyValue("AddClasses", value); }
        }

        [JQueryElement(null, "appendTo", true, "parent")]
        public string AppendTo
        {
            get { return GetPropertyValue<string>("AppendTo", null); }
            set { SetPropertyValue("AppendTo", value); }
        }

        [JQueryElement("axis")]
        public AxisRestriction? Axis
        {
            get { return GetPropertyValue<AxisRestriction>("Axis", null); }
            set { SetPropertyValue("Axis", value); }
        }

        [JQueryElement("cancel", true)]
        public string Cancel
        {
            get { return GetPropertyValue<string>("Cancel", null); }
            set { SetPropertyValue("Cancel", value); }
        }

        [JQueryElement("connectToSortable", true)]
        public string ConnectToSortable
        {
            get { return GetPropertyValue<string>("ConnectToSortable", null); }
            set { SetPropertyValue("ConnectToSortable", value); }
        }

        [JQueryElement("containment", true)]
        public string ContainmentSelector
        {
            get { return GetPropertyValue<string>("Containment", null); }
            set { SetPropertyValue("Containment", value); }
        }

        [JQueryElement("containment", false)]
        public string ContainmentComplex
        {
            get { return GetPropertyValue<string>("Containment", null); }
            set { SetPropertyValue("Containment", value); }
        }

        [JQueryElement("cursor")]
        public string Cursor
        {
            get { return GetPropertyValue<string>("Cursor", null); }
            set { SetPropertyValue("Cursor", value); }
        }

        [JQueryElement("cursorAt")]
        public string CursorAt
        {
            get { return GetPropertyValue<string>("CursorAt", null); }
            set { SetPropertyValue("CursorAt", value); }
        }

        [JQueryEvent("start")]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        [DefaultValue(null)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        public string Start
        {
            get { return GetPropertyValue<string>("Start", null); }
            set { SetPropertyValue("Start", value); }
        }

        [JQueryEvent("drag")]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        [DefaultValue(null)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        public string Drag
        {
            get { return GetPropertyValue<string>("Drag", null); }
            set { SetPropertyValue("Drag", value); }
        }

        [JQueryEvent("stop")]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        [DefaultValue(null)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        public string Stop
        {
            get { return GetPropertyValue<string>("Stop", null); }
            set { SetPropertyValue("Stop", value); }
        }

        protected override string jQueryFunction
        {
            get { return "draggable"; }
        }
    }
}
